<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>四位数验证码</title>
	</head>
	<body>
		<script>
		//Math.floor()向下取整
		//alert(Math.floor(4.9));
		//random() 随机数，返回一个0到1的随机数，注意不会等于1
		//10-20
		//1000-10000
		//四位数验证码
		alert(Math.floor(Math.random()*9000)+1000);
		</script>
		
	</body>
</html>
